@extends('layouts.default')

@section('title')
设备返修
@stop

@section('pre')
<li class="active"><span>@yield('title')</span></li>
@stop

@section('css')
<style type="text/css">
    .phone-group{
        height:30px;
    }
</style>
@stop

@section('content')

<div class="row">
    <div class="col-md-12">

        <div class="main-box">
            <header class="main-box-header clearfix">
                <h2>返修详情</h2>
            </header>
            <div class="main-box-body clearfix">
                <form role="form" method="post" onsubmit="return check()">
                    <div class="form-group col-md-12">
                        <label for="logistics" class="control-label col-md-2">物流</label>
                        <div class="col-md-10">
                            <input class="form-control" name="logistics" id="logistics" type="text" placeholder="请输入物流类型" value="{{isset($data['logistics'])?$data['logistics']:''}}" required="required"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="num" class="control-label col-md-2">物流单号</label>
                        <div class="col-md-10">
                            <input class="form-control" name="logistics_order" id="logistics_order" type="text" placeholder="请输入物流单号" value="{{isset($data['logistics_order'])?$data['logistics_order']:''}}" required="required"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="fee" class="control-label col-md-2">物流费用</label>
                        <div class="col-md-10">
                            <input class="form-control" name="pay" id="pay" type="text" placeholder="请输入物流费用" onkeyup="this.value = this.value.replace(/\D/g, '')" onafterpaste="this.value=this.value.replace(/\D/g,'')" value="{{isset($data['pay'])?$data['pay']:''}}"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="content" class="control-label col-md-2">返修详情</label>
                        <div class="col-md-10">
                            <textarea name="content" id="content" style="width:100%;height: 200px;">{{isset($data['content'])?$data['content']:''}}</textarea>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="devices" class="control-label col-md-2">设备列表</label>
                        <div class="col-md-10">
                            <table class="table mytable" id="devices">
                                <tr>
                                    <th>设备ID</th><th>硬件系列号</th><th>通讯系列号</th><th>联系方式</th>
                                </tr>
                                @foreach($data['devices'] as $v)
                                <tr><td>{{$v['id']}}</td><td>{{$v['hardware_serial']}}</td><td>{{$v['communication_serial']}}</td><td style="max-width: 350px;overflow: auto;">{{implode(',',$v['username'])}}</td></tr>
                                @endforeach
                            </table>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="logistics" class="control-label col-md-2">返还物流</label>
                        <div class="col-md-10">
                            <input class="form-control" name="logistics" id="logistics" type="text" placeholder="请输入物流类型" value="{{isset($data['logistics_return'])?$data['logistics_return']:''}}" required="required"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="num" class="control-label col-md-2">返还物流单号</label>
                        <div class="col-md-10">
                            <input class="form-control" name="logistics_order" id="logistics_order" type="text" placeholder="请输入物流单号" value="{{isset($data['logistics_order_return'])?$data['logistics_order_return']:''}}" required="required"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="fee" class="control-label col-md-2">返还物流费用</label>
                        <div class="col-md-10">
                            <input class="form-control" name="pay" id="pay" type="text" placeholder="请输入物流费用" onkeyup="this.value = this.value.replace(/\D/g, '')" onafterpaste="this.value=this.value.replace(/\D/g,'')" value="{{isset($data['pay_return'])?$data['pay_return']:''}}"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="fee" class="control-label col-md-2">预计修好的时间</label>
                        <div class="col-md-10">
                            <input class="form-control" name="pay" id="pay" type="text" placeholder="请输入预计修好的时间" onkeyup="this.value = this.value.replace(/\D/g, '')" onafterpaste="this.value=this.value.replace(/\D/g,'')" value="{{isset($data['repair_time'])?$data['repair_time']:''}}"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label for="num" class="control-label col-md-2">当前状态</label>
                        <div class="col-md-10">
                            <span class="red">{{$data['status']}}</span>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
@stop
